# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=cyclone-stage0
pkgver=0.35.0
pkgrel=2
pkgdesc="Cyclone version used to initially bootstrap the Cyclone compiler"
url="https://justinethier.github.io/cyclone/"
# s390x: ck on s390x does not have ck_pr_cas_8 (used by cyclone)
arch="all !s390x"
license="MIT"
depends="!cyclone"
makedepends="ck-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/justinethier/cyclone-bootstrap/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/cyclone-bootstrap-$pkgver"

# Provide cyclone-bootstrap for community/cyclone.
# See the comment in community/cyclone for more information.
provides="cyclone-bootstrap=$pkgver"
provider_priority=1 # lowest

export PREFIX=/usr
export DATADIR=$PREFIX/lib/cyclone

build() {
	make
}

check() {
	make test
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="
9aabae2bdcccdf6873780947c41a3230b80a3a5e93c9797cdfe278ba971e2b43320edab31349403a7fb14416c92216395d76af2415c33fb28f041ab867f2d716  cyclone-stage0-0.35.0.tar.gz
"
